
#pragma once


namespace __OCF_PROXY__ 
{


using namespace __OCF_BASE__;

#define MAX_CHANNEL_INPUT	(32)
#define MAX_CHANNEL_NAME	(80)
#define MAX_PACKET_SIZE	(0xFFFF)


#pragma pack(1)

typedef struct
{
	LONG m_lUsers;
	LONG m_lChannelNumber;
	BYTE m_byAttr;
	char m_achChannelName[MAX_CHANNEL_NAME];
}_CHANNEL_INFO_T;

#pragma pack()




template <class NC>
class CUserToRoom
{
	typedef TYPE_LIST06(USHORT,USHORT*,_CHANNEL_INFO_T,_CHANNEL_INFO_T*,long,long*) _OCF_PROXYSTUB_TYPELIST_T;
	enum __ENUM_PROXYSTUB_FUNCTION_TYPE__
	{

	};
	typedef NC _N_CLI_T;
public:
	CUserToRoom(_N_CLI_T* pcNc)
		:m_pcNc(pcNc)
	{
		m_ulLenSndBuff = 0;
		m_pSndBuff = NULL;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenRcvBuff = 0;
		m_pRcvBuff = NULL;
#endif
	}
	virtual ~CUserToRoom()
	{
	}
	CUserToRoom& operator =(const CUserToRoom& cFrom)
	{
		m_pcNc = cFrom.m_pcNc;
		m_ulLenSndBuff = cFrom.m_ulLenSndBuff;
		m_pSndBuff = cFrom.m_pSndBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenRcvBuff = cFrom.m_ulLenRcvBuff;
		m_pRcvBuff = cFrom.m_pRcvBuff;
#endif

		return *this;
	}
public:
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff, ULONG ulLenRcvBuff = 0, void* pRcvBuff = NULL) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }
	inline void SetProxyInfo_Return(ULONG ulLenRcvBuff, void* pRcvBuff) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }
	inline ULONG GetLengthSndBuff() { return m_ulLenSndBuff; }
	inline ULONG GetLengthRcvBuff() { return m_ulLenRcvBuff; }
	inline void* GetSndBuff() { return m_pSndBuff; }
	inline void* GetRcvBuff() { return m_pRcvBuff; }
#else
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; }
	inline ULONG GetLengthSndBuff() { return m_ulLenSndBuff; }
	inline void* GetSndBuff() { return m_pSndBuff; }
#endif

private:
	ULONG m_ulLenSndBuff;
	void* m_pSndBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	ULONG m_ulLenRcvBuff;
	void* m_pRcvBuff;
#endif
	_N_CLI_T* m_pcNc;
};


#undef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__


template <class NC>
class CRoomToUser
{
	typedef TYPE_LIST06(USHORT,USHORT*,_CHANNEL_INFO_T,_CHANNEL_INFO_T*,long,long*) _OCF_PROXYSTUB_TYPELIST_T;
	enum __ENUM_PROXYSTUB_FUNCTION_TYPE__
	{

	};
	typedef NC _N_CLI_T;
public:
	CRoomToUser(_N_CLI_T* pcNc)
		:m_pcNc(pcNc)
	{
		m_ulLenSndBuff = 0;
		m_pSndBuff = NULL;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenRcvBuff = 0;
		m_pRcvBuff = NULL;
#endif
	}
	virtual ~CRoomToUser()
	{
	}
	CRoomToUser& operator =(const CRoomToUser& cFrom)
	{
		m_pcNc = cFrom.m_pcNc;
		m_ulLenSndBuff = cFrom.m_ulLenSndBuff;
		m_pSndBuff = cFrom.m_pSndBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenRcvBuff = cFrom.m_ulLenRcvBuff;
		m_pRcvBuff = cFrom.m_pRcvBuff;
#endif

		return *this;
	}
public:
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff, ULONG ulLenRcvBuff = 0, void* pRcvBuff = NULL) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }
	inline void SetProxyInfo_Return(ULONG ulLenRcvBuff, void* pRcvBuff) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }
	inline ULONG GetLengthSndBuff() { return m_ulLenSndBuff; }
	inline ULONG GetLengthRcvBuff() { return m_ulLenRcvBuff; }
	inline void* GetSndBuff() { return m_pSndBuff; }
	inline void* GetRcvBuff() { return m_pRcvBuff; }
#else
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; }
	inline ULONG GetLengthSndBuff() { return m_ulLenSndBuff; }
	inline void* GetSndBuff() { return m_pSndBuff; }
#endif

private:
	ULONG m_ulLenSndBuff;
	void* m_pSndBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	ULONG m_ulLenRcvBuff;
	void* m_pRcvBuff;
#endif
	_N_CLI_T* m_pcNc;
};


#undef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__


template <class NC>
class CRoomToGw
{
	typedef TYPE_LIST06(USHORT,USHORT*,_CHANNEL_INFO_T,_CHANNEL_INFO_T*,long,long*) _OCF_PROXYSTUB_TYPELIST_T;
	enum __ENUM_PROXYSTUB_FUNCTION_TYPE__
	{
		__ENUM_FUNCTION_TYPE_fnFetchChannelInfo__ = 10,

	};
	typedef NC _N_CLI_T;
public:
	CRoomToGw(_N_CLI_T* pcNc)
		:m_pcNc(pcNc)
	{
		m_ulLenSndBuff = 0;
		m_pSndBuff = NULL;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenRcvBuff = 0;
		m_pRcvBuff = NULL;
#endif
	}
	virtual ~CRoomToGw()
	{
	}
	CRoomToGw& operator =(const CRoomToGw& cFrom)
	{
		m_pcNc = cFrom.m_pcNc;
		m_ulLenSndBuff = cFrom.m_ulLenSndBuff;
		m_pSndBuff = cFrom.m_pSndBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenRcvBuff = cFrom.m_ulLenRcvBuff;
		m_pRcvBuff = cFrom.m_pRcvBuff;
#endif

		return *this;
	}
	long fnFetchChannelInfo(const ULONG _Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, const ULONG _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_[], const ULONG _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_[], const BYTE _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_,const USHORT uiServerID,const long lLen,const _CHANNEL_INFO_T * pstChannelInfo)
	{
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenSndBuff, m_pSndBuff);

		if (FALSE == cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.Push(static_cast<USHORT>(10)).Push(uiServerID).Push(lLen,pstChannelInfo).IsValid()) return -1;

		return m_pcNc->Send(_Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_, _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_, _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetDataLength(), cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetStartDataPtr());
	}
public:
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff, ULONG ulLenRcvBuff = 0, void* pRcvBuff = NULL) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }
	inline void SetProxyInfo_Return(ULONG ulLenRcvBuff, void* pRcvBuff) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }
	inline ULONG GetLengthSndBuff() { return m_ulLenSndBuff; }
	inline ULONG GetLengthRcvBuff() { return m_ulLenRcvBuff; }
	inline void* GetSndBuff() { return m_pSndBuff; }
	inline void* GetRcvBuff() { return m_pRcvBuff; }
#else
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; }
	inline ULONG GetLengthSndBuff() { return m_ulLenSndBuff; }
	inline void* GetSndBuff() { return m_pSndBuff; }
#endif

private:
	ULONG m_ulLenSndBuff;
	void* m_pSndBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	ULONG m_ulLenRcvBuff;
	void* m_pRcvBuff;
#endif
	_N_CLI_T* m_pcNc;
};


#undef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
}
